﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EricUtility;
using EricUtility.Networking.Gathering;
using EbayQueryExpertLib.EbayFinding;
using System.Drawing;

namespace EbayQueryExpertLib.Entities
{
    public class EbaySearchItem : AbstractLoadingTuple
    {
        private SearchItem m_Item;
        private Image m_Icone;

        public Image Icone
        {
            get { return m_Icone; }
        }

        public SearchItem Item
        {
            get { return m_Item; }
        }

        public EbaySearchItem(SearchItem it)
        {
            m_Item = it;
        }
        public override string ToString()
        {
            return m_Item.title;
        }
        protected override void OnLoad()
        {
            if (m_Item.galleryURL != null)
                m_Icone = GatheringUtility.GetImage(m_Item.galleryURL);
        }
    }
}
